<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Patel Pedido</title>
    </h:head>
    <h:body>
       <h:form>
           <h1>Pedido Pastel</h1>
           <div>Cliente: <h:inputText value="#{bean.cliente}"/> </div>
           <div>Tipo:</div>
           <div>
               <h:selectOneRadio value="#{bean.escolhatipo}" >
                    <f:selectItems value="#{bean.tipo}"/>
               </h:selectOneRadio>
           </div>
           <div>Você conheceu o pastel:</div>
           <div>
               <h:selectManyCheckbox id="conheceu" value="#{bean.escolhaconheceu}" layout="pageDirection">
                   <f:selectItems value="#{bean.conheceu}"/>
               </h:selectManyCheckbox>
           </div>
           <div>Sabor:</div>
           <div>
               <h:selectOneListbox value="#{bean.escolhasabor}">
                    <f:selectItems value="#{bean.sabor}"/>
                </h:selectOneListbox>
           </div>
           <div>
               <h:dataTable var="pastel" value="#{produto.pasteis}">
                   <h:column>#{pastel.nome}</h:column>
                   <h:column>#{pastel.preco}</h:column>
               </h:dataTable>
           </div>

           <div>
               <h:dataTable var ="pastel" value="#{produto.pasteis}">
                   <h:column>
                       <f:facet name="header">
                           Pastel Nome:
                       </f:facet>
                       #{pastel.nome}
                   </h:column>
                   <h:column>
                       <f:facet name="header">
                           Pastel Preço:
                       </f:facet>
                       #{pastel.preco}
                   </h:column>
               </h:dataTable>
           </div>
            <div>
                <h:commandButton value="OK"/>
            </div>
           <div><h:commandButton value="Limpar" action="#{bean.LimparFormulario}"/></div>
      
        </h:form>
    </h:body>
</html>

